A rendering context, attached to a graphic window to present to the screen. More...
Public Member Functions | |
RenderContext () | |
virtual | ~RenderContext () |
Texture * | getBackBuffer () const |
Texture * | getDepthBuffer () const |
Viewport * | getViewport () const |
Compositor * | getCompositor () const |
int | getContextWidth () const |
int | getContextHeight () const |
bool | isWindowFocused () const |
nkWinUi::GraphicsWindow * | getAttachedWin () const |
bool | getOwnsWindow () const |
void | setCompositor (Compositor *value) |
void | setOwnsWindow (bool value) |
virtual void | setGammaCorrected (bool value)=0 |
virtual void | initialize (nkWinUi::GraphicsWindow *window)=0 |
virtual void | swap ()=0 |
virtual void | refreshBufferSize ()=0 |
virtual void | refreshViewportSize () |
A rendering context, attached to a graphic window to present to the screen.
nkGraphics::RenderContext::RenderContext | ( | ) |
Constructor. See RenderContextManager::createRenderContextFor() and derived.
|
virtual |
Destructor.
Texture* nkGraphics::RenderContext::getBackBuffer | ( | ) | const |
Texture* nkGraphics::RenderContext::getDepthBuffer | ( | ) | const |
Viewport* nkGraphics::RenderContext::getViewport | ( | ) | const |
Compositor* nkGraphics::RenderContext::getCompositor | ( | ) | const |
int nkGraphics::RenderContext::getContextWidth | ( | ) | const |
int nkGraphics::RenderContext::getContextHeight | ( | ) | const |
bool nkGraphics::RenderContext::isWindowFocused | ( | ) | const |
nkWinUi::GraphicsWindow* nkGraphics::RenderContext::getAttachedWin | ( | ) | const |
bool nkGraphics::RenderContext::getOwnsWindow | ( | ) | const |
void nkGraphics::RenderContext::setCompositor | ( | Compositor * | value | ) |
Sets the compositor the context should be rendered with.
value | The compositor to use. Can be reset with nullptr. |
void nkGraphics::RenderContext::setOwnsWindow | ( | bool | value | ) |
Sets whether the context owns the window it is attached to.
value | Whether the context owns the window (true) or not (false). |
|
pure virtual |
Sets whether the context should be gamma corrected or not.
value | Whether the context should be gamma corrected (true) or not (false). |
|
pure virtual |
Initializes and loads all internal memory necessary.
|
pure virtual |
Part of the rendering logic. In theory, should not be called by external code.
|
pure virtual |
Callback for when the window size changes.
|
virtual |
Callback for when the window size changes.